<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/global.css" />
<link rel="stylesheet" type="text/css" href="style/admin.css" />
<link rel="stylesheet" type="text/css" href="style/tip.css" />
<title>问卷管理__添加问卷</title>
</head>

<body>
	<div id="wrap">
    	<div id="public_head"></div>
        <div class="m_revise" id="revise">
          <form action="" method="post" onsubmit='return checkform(this);'>
        	<table class="tableForm" width="0" border="0">
              <tr><th height="45">问卷名称</th><td colspan="3"><input check="empty" class="qf_text" name="q_name" type="text" value="<?php echo isset($quesnr)?$quesnr['TITLE']:'';?>"/></td></tr>
              <tr><th height="45">截止时间</th><td width="120"><input class="Wdate" type="text" value="<?php echo isset($quesnr)?$quesnr['END_TIME']:date('Y-m-d H:i',strtotime("+7 days"));?>" name='q_endtime' onClick="WdatePicker({startDate:'%y-%M-%d 10:30',dateFmt:'yyyy-MM-dd HH:mm'})"></td></tr>
              <tr><th height="45">问卷分类</th><td colspan="3"><select class="select" name="q_cate"><?php if(is_array($q_cate) && count($q_cate)>0){
              	foreach ($q_cate as $v){
              		$flag = isset($quesnr)?$quesnr['CAT']==$v['CID']?' selected ':'':'';
              		echo "<option value='{$v['CID']}' ".$flag.">{$v['CN']}</option>";
              	}
              	echo '</select>';
              }else{echo "<option value='0'>您还没有添加分类</option></select>&nbsp;&nbsp;<span style='color:red;cursor:pointer;' onclick='alert(\"弹出添加科室弹层\")'>现在添加科室</span>";}?></td></tr>
              <tr><th height="45">科室</th><td colspan="3"><select class="select" name="q_dep"><?php if(is_array($dep) && count($dep)>0){
              	foreach ($dep as $v){
              		$flag = isset($quesnr)?$quesnr['DEP_NO']==$v['DEP_NO']?' selected ':'':'';
              		echo "<option value='{$v['DEP_NO']}' ".$flag.">{$v['DEP_NAME']}</option>";
              	}
              	echo '</select>';
              }else{echo "<option value='0'>您还没有添加科室</option></select>&nbsp;&nbsp;<span style='color:red;cursor:pointer;' onclick='alert(\"弹出添加科室弹层\")'>现在添加科室</span>";}?></td></tr>
              <tr><th  height="200" style=" vertical-align:top">问卷说明</th><td  colspan="3"><textarea class="textarea" name="q_info" cols="" rows=""><?php echo isset($quesnr)?$quesnr['NOTE']:'';?></textarea></td></tr>
              <tr><th height="45"></th><td colspan="3"><input class="qf_btn" name="add_next" type="submit" value=""/>&nbsp;<input class="btn_gray" onclick="history.back();" name="" type="button" value="返回"/></td></tr>
            </table>
          </form>
        </div>
    </div>
</body>
</html>
<script src="js/xheditor/jquery/jquery-1.4.4.min.js"></script>
<script language="javascript" type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
<script src="js/boot.js"></script>
<script src="js/tip.js"></script>
<script src="js/checkform.js"></script>
<script src="/js/add_public_head.js" type="text/javascript"></script>